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

GetReceivedAlready() public method

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