Пример #1
0
        public override void Pay(CreditPaymentInfo info)
        {
            paymentInfo = info;

            if (input != null && !input.IsEmpty)
            {
                info.Amount = input.ToDecimal();
            }

            if (info.Id == -1)//Credit not assigned
            {
                paymentInfo = info;
                cr.State    = ListCreditTypes.Instance(CreditPaymentInfo.GetCredits(),
                                                       new ProcessSelectedItem <CreditPaymentInfo>(Payment.GetCreditInstallments));
            }
            else//Called from K1..K4
            {
                CreditPaymentInfo cInfo = (CreditPaymentInfo)info.Clone();

                if (input != null && !input.IsEmpty)
                {
                    cInfo.Amount = input.ToDecimal();
                }

                input = new Number();
                if (cInfo.Amount >= 0)
                {
                    GetCreditInstallments(cInfo);
                }
                else
                {
                    cr.State = States.AlertCashier.Instance(new Confirm(PosMessage.PAYMENT_INVALID));
                }
            }
        }
Пример #2
0
        public override void Enter()
        {
            CreditPaymentInfo cpi = (CreditPaymentInfo)ie.Current;

            ProcessSelected((CreditPaymentInfo)cpi.Clone());
        }