示例#1
0
        /// <summary>
        /// 获取单位数量
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="msterID">物料ID</param>
        /// <param name="sourceUintId">基本单位ID</param>
        /// <param name="destUnitId">转换的单位Id</param>
        /// <param name="sourceQty">基本单位数量</param>
        /// <returns></returns>
        private decimal GetConvertedQty(Context ctx, long msterID, long sourceUintId, long destUnitId, decimal sourceQty)
        {
            UnitConvert convert = Kingdee.BOS.App.ServiceHelper.GetService <IUnitConvertService>().GetUnitConvertRate(ctx,
                                                                                                                      new GetUnitConvertRateArgs()
            {
                MasterId     = msterID,
                SourceUnitId = sourceUintId,
                DestUnitId   = destUnitId
            });

            return(convert.ConvertQty(sourceQty));
        }