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;
}