Example #1
0
        public frmPayCash(PayCashConfirmation payCashConfirmation)
            : this()
        {
            this.operationDone = false;
            if (payCashConfirmation == null)
            {
                throw new ArgumentNullException("payCashConfirmation");
            }
            this.tenderInfo = (Tender)payCashConfirmation.TenderInfo;
            this.Text       = payCashConfirmation.Title;

            amtCashAmounts.LocalCurrencyCode = ApplicationSettings.Terminal.StoreCurrency;
            amtCashAmounts.UsedCurrencyCode  = ApplicationSettings.Terminal.StoreCurrency;
            this.balanceAmount                 = payCashConfirmation.BalanceAmount;
            amtCashAmounts.SoldLocalAmount     = PosApplication.Instance.Services.Rounding.RoundAmount(balanceAmount, ApplicationSettings.Terminal.StoreId, tenderInfo.TenderID.ToString());
            amtCashAmounts.ForeignCurrencyMode = false;
            amtCashAmounts.HighestOptionAmount = tenderInfo.MaximumAmountAllowed;
            amtCashAmounts.LowesetOptionAmount = tenderInfo.MinimumAmountAllowed;

            if (this.tenderInfo.OverTenderAllowed)
            {
                amtCashAmounts.ViewOption = LSRetailPosis.POSProcesses.WinControls.AmountViewer.ViewOptions.HigherAmounts;
            }
            else
            {
                amtCashAmounts.ViewOption = LSRetailPosis.POSProcesses.WinControls.AmountViewer.ViewOptions.ExcactAmountOnly;
            }

            amtCashAmounts.SetButtons();

            numCashNumpad.NegativeMode = this.balanceAmount < 0;
            numCashNumpad.Select();
        }