private void internalTenderTypeSelectorHandler(TenderTypePanel.TenderTypeButton t)
        {
            //Check to see if amount out matches the balance already
            if (this.tenderTablePanel.TenderAmount > this.amountDueToCustomer)
            {
                MessageBox.Show(
                    "Amount tendered to the customer already meets or exceeds " +
                    System.Environment.NewLine + "the total due to the customer.",
                    "Process Tender Warning");
                return;
            }

            TenderEntryVO   tEVO       = null;
            TenderEntryForm tEntryForm = null;

            switch (t)
            {
            case TenderTypePanel.TenderTypeButton.CASH:
                tEntryForm = new TenderEntryForm(TenderTypes.CASHOUT);
                break;

            case TenderTypePanel.TenderTypeButton.CHECK:
                tEntryForm = new TenderEntryForm(TenderTypes.CHECK);
                break;

            case TenderTypePanel.TenderTypeButton.CREDITORBILLAP:
                tEntryForm = new TenderEntryForm(TenderTypes.CREDITCARD);
                break;

            case TenderTypePanel.TenderTypeButton.DEBIT:
                tEntryForm = new TenderEntryForm(TenderTypes.DEBITCARD);
                break;

            case TenderTypePanel.TenderTypeButton.SHOPCREDIT:
                tEntryForm = new TenderEntryForm(TenderTypes.STORECREDIT);
                break;

            case TenderTypePanel.TenderTypeButton.PAYPAL:
                tEntryForm = new TenderEntryForm(TenderTypes.PAYPAL);
                break;
            }

            if (tEntryForm != null)
            {
                var res = tEntryForm.ShowDialog(this);
                if (res == DialogResult.OK)
                {
                    //Get the tender entry
                    tEVO = tEntryForm.TenderEntry;
                }
            }

            previousAmount = 0.0M;
            this.tenderTablePanel.RowIdx = -1;
            ProcessTenderEntered(tEVO);
        }
        private void internalTenderTypeSelectorHandler(TenderTypePanel.TenderTypeButton t)
        {
            //Check to see if amount out matches the balance already
            if (this.tenderTablePanel.TenderAmount > this.amountDueFromCustomer)
            {
                MessageBox.Show(
                    "Amount received from the customer already meets or exceeds " +
                    System.Environment.NewLine + "the total amount due from the customer.",
                    "Process Tender Warning");
                return;
            }

            TenderEntryVO        tEVO           = null;
            TenderEntryForm      tEntryForm     = null;
            List <TenderEntryVO> currentTenders = this.tenderTablePanel.GetTenderList;

            switch (t)
            {
            case TenderTypePanel.TenderTypeButton.CASH:
            {
                var cashTender = (from tenderData in currentTenders
                                  where tenderData.TenderType == TenderTypes.CASHIN
                                  select tenderData.Amount).FirstOrDefault();
                tEntryForm = new TenderEntryForm(TenderTypes.CASHIN);
                if (Utilities.GetDecimalValue(cashTender, 0) > 0)
                {
                    tEntryForm.SetAmount = Utilities.GetDecimalValue(cashTender, 0);
                }
            }
            break;

            case TenderTypePanel.TenderTypeButton.CHECK:
                tEntryForm = new TenderEntryForm(TenderTypes.CHECK);
                break;

            case TenderTypePanel.TenderTypeButton.CREDITORBILLAP:
                tEntryForm = new TenderEntryForm(TenderTypes.CREDITCARD);
                break;

            case TenderTypePanel.TenderTypeButton.DEBIT:
                tEntryForm = new TenderEntryForm(TenderTypes.DEBITCARD);
                break;

            case TenderTypePanel.TenderTypeButton.SHOPCREDIT:

                //Check if the customer is looked up
                if (GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer == null ||
                    string.IsNullOrEmpty(GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer.CustomerNumber))
                {
                    GlobalDataAccessor.Instance.DesktopSession.ShopCreditFlow = true;
                    LookupCustomer();
                }

                else
                {
                    var screditTender = (from tenderData in currentTenders
                                         where tenderData.TenderType == TenderTypes.STORECREDIT
                                         select tenderData.Amount).FirstOrDefault();
                    tEntryForm = new TenderEntryForm(TenderTypes.STORECREDIT);
                    if (Utilities.GetDecimalValue(screditTender, 0) > 0)
                    {
                        tEntryForm.SetAmount = Utilities.GetDecimalValue(screditTender, 0);
                    }
                }
                break;

            case TenderTypePanel.TenderTypeButton.PAYPAL:
                tEntryForm = new TenderEntryForm(TenderTypes.PAYPAL);
                break;
            }

            if (tEntryForm != null)
            {
                var res = tEntryForm.ShowDialog(this);
                if (res == DialogResult.OK)
                {
                    //Get the tender entry
                    tEVO = tEntryForm.TenderEntry;
                }
            }
            previousAmount = 0.0M;
            this.tenderTablePanel.RowIdx = -1;
            ProcessTenderEntered(tEVO);
        }