Browse Source

需求单No.139460

master
luanhui 7 years ago
parent
commit
5fc58c1574
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      B3QingDaoWanFu/TypeIOCs/SaleOutStoreBLTypeIoc.cs

+ 12
- 0
B3QingDaoWanFu/TypeIOCs/SaleOutStoreBLTypeIoc.cs View File

@ -25,6 +25,18 @@ namespace BWP.B3QingDaoWanFu.TypeIOCs
{
detail.FactoryPrice = GetFactoryPrice(context, dmo, detail.SaleGoods_ID);
}
var query=new DmoQuery(typeof(SaleGoods_Accounting_Store));
query.Where.Conditions.Add(DQCondition.EQ("AccountingUnit_ID",dmo.AccountingUnit_ID));
query.Where.Conditions.Add(DQCondition.InList(DQExpression.Field("SaleGoods_ID"),dmo.Details.Select(x=>DQExpression.Value(x.SaleGoods_ID)).ToArray()));
var list = context.Session.ExecuteList(query).Cast<SaleGoods_Accounting_Store>().ToList();
foreach (SaleGoods_Accounting_Store storeset in list)
{
if (storeset.Store_ID != dmo.Store_ID)
{
throw new Exception(storeset.SaleGoods_Name+"配置的仓库:"+storeset.Store_Name+" 与单据上的仓库不一致,不允许保存");
}
}
}
private Money<decimal>? GetFactoryPrice(IDmoContext context, SaleOutStore dmo, long detailSaleGoodsId)


Loading…
Cancel
Save