优化
This commit is contained in:
@@ -144,8 +144,10 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
{
|
{
|
||||||
//明细中:所有的应入数量之和
|
//明细中:所有的应入数量之和
|
||||||
var totalAccruedQty= this.Details.Sum(x => x.AccruedQty);
|
var totalAccruedQty= this.Details.Sum(x => x.AccruedQty);
|
||||||
|
////明细中:所有的收货数量之和
|
||||||
|
//var totalReceiveQty = this.Details.Sum(x => x.ReceiveQty);
|
||||||
//明细中:所有的收货数量之和
|
//明细中:所有的收货数量之和
|
||||||
var totalReceiveQty = this.Details.Sum(x => x.ReceiveQty);
|
var totalReceiveQty = this.Details.Where(x=>x.AccruedQty>0).Sum(x => x.ReceiveQty);
|
||||||
|
|
||||||
if (totalAccruedQty == totalReceiveQty)
|
if (totalAccruedQty == totalReceiveQty)
|
||||||
this.Status = InstockStatus.Already;
|
this.Status = InstockStatus.Already;
|
||||||
@@ -163,8 +165,10 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
{
|
{
|
||||||
//明细中:所有的应入数量之和
|
//明细中:所有的应入数量之和
|
||||||
var totalAccruedQty = this.Details.Sum(x => x.AccruedQty);
|
var totalAccruedQty = this.Details.Sum(x => x.AccruedQty);
|
||||||
|
////明细中:所有的收货数量之和
|
||||||
|
//var totalReceiveQty = this.Details.Sum(x => x.ReceiveQty);
|
||||||
//明细中:所有的收货数量之和
|
//明细中:所有的收货数量之和
|
||||||
var totalReceiveQty = this.Details.Sum(x => x.ReceiveQty);
|
var totalReceiveQty = this.Details.Where(x => x.AccruedQty > 0).Sum(x => x.ReceiveQty);
|
||||||
|
|
||||||
if (totalAccruedQty == totalReceiveQty)
|
if (totalAccruedQty == totalReceiveQty)
|
||||||
this.Status = InstockStatus.Already;
|
this.Status = InstockStatus.Already;
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ namespace WMS.Web.Repositories
|
|||||||
{
|
{
|
||||||
list.ForEach(x =>
|
list.ForEach(x =>
|
||||||
{
|
{
|
||||||
var current_instock_dets= instockDets.Where(t => t.ErpDetailId == x.ErpDetailId).ToList();
|
var current_instock_dets= instockDets.Where(t => t.ErpDetailId == x.ErpDetailId && t.MaterialId==x.MaterialId).ToList();
|
||||||
if (current_instock_dets != null && current_instock_dets.Count != 0 && x.ErpDetailId==current_instock_dets.FirstOrDefault().ErpDetailId)
|
if (current_instock_dets != null && current_instock_dets.Count != 0 && x.ErpDetailId==current_instock_dets.FirstOrDefault().ErpDetailId)
|
||||||
{
|
{
|
||||||
//+该明细的入库数量之和;在这里处理
|
//+该明细的入库数量之和;在这里处理
|
||||||
|
|||||||
Reference in New Issue
Block a user