Example #1
0
        public void pay(Decimal payment)
        {
            if (payment >= totalAmount && payment >= totalAmountWithService)
            {
                decimal total = 0;

                if (totalAmountWithService != 0)
                {
                    total = totalAmountWithService;
                }
                else
                {
                    total = totalAmount;
                }

                if (dbController.insertReceipt(currentTransaction, total, payment))
                {
                    lblPOSmsg.Text = String.Format("Payment: Php {0}", payment);
                    change         = payment - total;
                    //lblChange.Text = change.ToString();

                    concludeTransaction = true;
                    //paymentTimer.Start();
                    printReceipt();
                    conclusion();

                    //txtPayment.Clear();
                    resetTransaction();
                }
            }
            else
            {
                MessageBox.Show("Oops.. Insuficient payment");
            }
        }