예제 #1
0
        public void ReComputeSurchrge()
        {
            ArrayList ejList = PosContext.Instance.CurrentEj.EjArrayList;

            foreach (object obj in ejList)
            {
                if (obj is EjSurcharge)
                {
                    EjSurcharge ejSur = obj as EjSurcharge;
                    if (ejSur.Method == 0)
                    {
                        ejSur.ReApplySurcharge();
                    }
                }
            }
        }
예제 #2
0
        public override void Engage(int keyValue)
        {
            //MessageBox.Show("*** Item markdown ***" + keyValue.ToString() );
            //if there are no items in the invoice error out

            Surcharge surcharge = new Surcharge();

            surcharge.Surcharge_key_id = keyValue;
            surcharge.Organization_no  = PosSettings.Default.Organization;
            surcharge.LoadByKeyId();
            if (!string.IsNullOrEmpty(surcharge.Surcharge_desc))
            {
                EjSurcharge ejSurcharge = new EjSurcharge(surcharge);
                ejSurcharge.Engage(0);
            }
            PosEventStack.Instance.NextEvent();
        }
예제 #3
0
        public void Update(EjSurcharge ejSurcharge)
        {
            prompt.PromptText = ejSurcharge.PromptText;
            prompt.InputText  = "";
            //posDisplay.MessageText = ejItem.Quantity.ToString() + " * " +
            //    ejItem.Desc + "    " + string.Format("{0:###########0.00}", ejItem.Amount);

            if (PosHardware.Instance.LineDisplay != null)
            {
                PosHardware.Instance.LineDisplay.Clear();
                PosHardware.Instance.LineDisplay.SetText(ejSurcharge.Desc, 0, 0);
                //Item price
                string itemPrice = string.Format("{0:#########0.00}", ejSurcharge.Amount);
                int    col       = PosHardware.Instance.LineDisplay.PromptWidth() - itemPrice.Length - 1;
                PosHardware.Instance.LineDisplay.SetText(itemPrice, 1, col);
                //Total
                string total = string.Format("{0:<#########0.00>}", PosContext.Instance.CurrentEj.EjSubTotal());;
                PosHardware.Instance.LineDisplay.SetText(total, 1, 0);
            }
        }