Ejemplo n.º 1
0
 public void AddEntry(ProductStockEntry entry)
 {
     if (entry.StockEntry is null)
     {
         entry.StockEntry = this;
     }
     //entry.Product.Stockentries.Add(entry);
     this.Items.Add(entry);
 }
Ejemplo n.º 2
0
        public void AddEntry(Product product, DateTime?maturityDate, int quantity, string lotCode)
        {
            if (product is null)
            {
                return;
            }
            var entry = new ProductStockEntry
            {
                Product    = product,
                StockEntry = this,
                Quantity   = quantity,
                LotCode    = lotCode
            };

            if (maturityDate.HasValue)
            {
                entry.ProductMaturityDate = maturityDate.Value;
            }
            AddEntry(entry);
        }