Ejemplo n.º 1
0
        public static void DisplayReceipt()
        {
            var dateTime = DateTime.Now;

            Console.WriteLine("==========================");
            Console.WriteLine("         RECEIPT     ");
            Console.WriteLine("==========================");
            Console.WriteLine($"{dateTime}");
            Console.WriteLine("");
            Console.WriteLine("Items Ordered: (this is where product and qty will go)");
            Console.WriteLine($"Subtotal: ${SubtotalBill.GetSubtotal(1,2)}");
            Console.WriteLine($"Grand Total: ${SubtotalBill.GetGrandTotal(1,2)}");
            //need to put if client pays with cash, credit, card
        }
Ejemplo n.º 2
0
        public static void GetPaymentType()
        {
            Console.WriteLine("How would you like to pay for your item(s)? [1] Cash, [2] Credit, or [3] Check?");
            string userInput = Console.ReadLine();

            if (userInput == "1" || userInput.Equals("cash", StringComparison.OrdinalIgnoreCase))
            {
                decimal change = (decimal)SubtotalBill.GetChange(GetCashPayment(), SubtotalBill.GetGrandTotal(1, 2));
                Console.WriteLine($"Change due: ${change} ");
            }
            else if (userInput == "2" || userInput.Equals("credit", StringComparison.OrdinalIgnoreCase))
            {
                ValidateCreditCardInfo();
            }
            else if (userInput == "3" || userInput.Equals("check", StringComparison.OrdinalIgnoreCase))
            {
                GetCheckNumber();
            }
        }