|
|
|
@ -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) |
|
|
|
|