出货单新增BP

List
foreach (ShipPlanAndZHDDTOData ShipPlanAndZHDDTO in ShipPlanAndZHDDTOList)
{
// 出货计划行
ShipPlanLine shipPlanLineHolder = ShipPlanLine.Finder.FindByID(ShipPlanAndZHDDTO.ShipPlanLineID);
if (shipPlanLineHolder == null)
{
throw new Exception("根据ID【" + ShipPlanAndZHDDTO.ShipPlanLineID + "】未找到对应出货计划行");
}
if (shipPlanLineHolder.ShipPlan.Status == ShipPlanDocStatusEnum.Script ||
shipPlanLineHolder.ShipPlan.Status == ShipPlanDocStatusEnum.Open ||
shipPlanLineHolder.ShipPlan.Status == ShipPlanDocStatusEnum.Posting)
{
throw new Exception("出货计划【" + shipPlanLineHolder.ShipPlan.DocNo + "】未审核");
}
SMPullSrcDocDTOData ship = new SMPullSrcDocDTOData();
// 来源单据类型 = 出货计划
ship.SrcDocType = 2;
// 组织
ship.OrgKey = Context.LoginOrg.ID;
// 来源单据 = 出货计划行
ship.SMEntityKey = new Base.PropertyTypes.BizEntityKeyData();
ship.SMEntityKey.EntityID = shipPlanLineHolder.ID;
ship.SMEntityKey.EntityType = "UFIDA.U9.SM.ShipPlan.ShipPlanLine";
// 数量
ship.ShipQty = new CBO.DTOs.DoubleQuantityData();
ship.ShipQty.Amount1 = shipPlanLineHolder.PlanQtyTU;
ship.ShipQty.Amount2 = shipPlanLineHolder.PlanQtyTU;
ship.ShipQty.UOM1 = new UOMInfoDTOData();
ship.Ship
出货单新增BP
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。



