Ejemplo n.º 1
0
        public ReceiptItem AddItemByPrice(double price)
        {
            var tax_amount = price * DefaultTaxAmount;
            var item       = new ReceiptItem
            {
                ItemID   = Guid.NewGuid(),
                ItemName = "",
                Price    = price,
                Tax      = tax_amount,
            };

            Items.Add(item);
            PropertyChanged?
            .Invoke(this,
                    new PropertyChangedEventArgs("SubTotal"));

            PropertyChanged?
            .Invoke(this,
                    new PropertyChangedEventArgs("TotalTax"));

            PropertyChanged?
            .Invoke(this,
                    new PropertyChangedEventArgs("Total"));

            return(item);
        }
Ejemplo n.º 2
0
 public void RemoveItem(ReceiptItem item)
 {
     Items.Remove(item);
 }