DRMFSS.BLL.ReceiptAllocation.GetReceivedAlreadyInUnit C# (CSharp) Method

GetReceivedAlreadyInUnit() public method

public GetReceivedAlreadyInUnit ( ReceiptAllocation receiptAllocation ) : decimal
receiptAllocation ReceiptAllocation
return decimal
        public decimal GetReceivedAlreadyInUnit(ReceiptAllocation receiptAllocation)
        {
            decimal sum = 0;
            if (receiptAllocation.Receives != null)
                foreach (Receive r in receiptAllocation.Receives)
                {
                    foreach (ReceiveDetail rd in r.ReceiveDetails)
                    {
                        sum = sum + rd.QuantityInUnit;
                    }
                }
            return sum;
        }