private void ClearTransaction() { sale.ItemList.Clear(); sale.ItemTotal = 0.00m; sale.TransactionTaxTotal = 0.00m; sale = new SaleTransaction(); }
public void AddItem(SaleProduct item) { //base.AddItem(item); if (sale == null) { sale = new SaleTransaction(); } if (sale.ItemList == null) { sale.ItemList = new List <SaleProduct>(); //new List<Product>(); } sale.ItemList.Add(item); AddToTransactionTotal(item.PriceList[0].Value, item.Quantity); AddToTaxTotal(item.ProductTax, item.PriceList[0].Value, item.Quantity); sale.TransactionTotal = sale.ItemTotal + sale.TransactionTaxTotal; }