U9料品多单位数量转换

                                var itemMaster = ItemMaster.Finder.FindByID(record.ItemInfo_ItemID);
                                if (itemMaster.InventorySecondUOMKey == itemMaster.PriceUOMKey)
                                {
                                    //库存单位-实到数量
                                    record.ArriveQtySU = record.ArriveQtyPU;
                                    //库存单位-点收数量
                                    record.EyeballingQtySU = record.EyeballingQtyPU;
                                }
                                else
                                {
                                    var rate = UFIDA.U9.PM.Util.UOMRate.GetUOMRate(itemMaster.PriceUOM.Key, null, -1m, itemMaster.InventorySecondUOM.Key, null, -1m, itemMaster.Key);
                                    //库存单位-实到数量
                                    record.ArriveQtySU = itemMaster.InventorySecondUOM.Round.GetRoundValue((record.ArriveQtyPU ?? 0) * rate);
                                    //库存单位-点收数量
                                    record.EyeballingQtySU = itemMaster.InventorySecondUOM.Round.GetRoundValue((record.EyeballingQtyPU ?? 0) * rate);
                                }

 

posted @ 2025-09-03 14:48  江境纣州  阅读(6)  评论(0)    收藏  举报