public void Purchase(VM_Item item) { item.QuantityRemaining--; item.QuantitySold++; currentBalance -= item.Price; totalSales += item.Price; TxWriter.Audit(item); }
public Change ReturnChange() { Change changeRetured = new Change((int)(currentBalance * 100), quartersRemaining, dimesRemaining, nickelsRemaining); TxWriter.Audit(currentBalance); currentBalance = 0.00; quartersRemaining -= changeRetured.Quarters; dimesRemaining -= changeRetured.Dimes; nickelsRemaining -= changeRetured.Nickels; return(changeRetured); }