Example #1
0
        public override void Document()
        {
            if (!(cr.Document is Receipt))
            {
                base.Document();
                return;
            }
            MenuList docTypes = new MenuList();

            Start.AddMenuLabel(docTypes, PosMessage.TRANSFER_DOCUMENT + "\n" + PosMessage.INVOICE, new Invoice(cr.Document));

            if (docTypes.Count > 0)
            {
                cr.State = ListDocument.Instance(docTypes, new ProcessSelectedItem <SalesDocument>(cr.ChangeDocumentType));
            }
            else
            {
                cr.State = AlertCashier.Instance(new Confirm("BELGE \n AKTARILAMAZ"));//:to do: do better
            }
        }
Example #2
0
        public override void Document()
        {
            MenuList docTypes = new MenuList();

            if (!(cr.Document is Receipt) && cr.Document.Id > 0)
            {
                cr.State = States.ConfirmCashier.Instance(new Confirm(PosMessage.CONFIRM_VOID_DOCUMENT, ConfirmVoidDocument, Instance));
                return;
            }

            int standing = 1;

            AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.INVOICE, new Invoice());
            AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.E_INVOICE, new EInvoice());
            AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.E_ARCHIVE, new EArchive());
            AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.MEAL_TICKET, new MealTicket());
            AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.CAR_PARKIMG, new CarParkDocument());
            AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.RECEIPT_TR, new Receipt());

            if (cr.IsAuthorisedFor(Authorizations.AdvanceAndReturnDocAuth)) // Check cashier auth for advance
            {
                AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.ADVANCE, new Advance());
            }

            AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.COLLECTION_INVOICE, new CollectionInvoice());
            AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.CURRENT_ACCOUNT_COLLECTION, new CurrentAccountDocument());
            AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.SELF_EMPLOYEMENT_INVOICE, new SelfEmployementInvoice());

            /*  İade Fişi */
            if (cr.IsAuthorisedFor(Authorizations.AdvanceAndReturnDocAuth))
            {
                AddMenuLabel(docTypes, PosMessage.SELECT_DOCUMENT + "\t" + standing++ + "\n" + PosMessage.RETURN_DOCUMENT_TR, new ReturnDocument());
            }


            cr.State = ListDocument.Instance(docTypes, new ProcessSelectedItem <SalesDocument>(cr.ChangeDocumentType));
            DisplayAdapter.Customer.Show(PosMessage.WELCOME);
        }
Example #3
0
        public override void Document()
        {
            if (!(cr.Document is Receipt))
            {
                States.AlertCashier.Instance(new Confirm(cr.Document.Name + PosMessage.DOCUMENT_CHANGE_ERROR));
                cr.State = States.Start.Instance();
                return;
            }

            MenuList docTypes = new MenuList();

            Start.AddMenuLabel(docTypes, PosMessage.TRANSFER_DOCUMENT + "\n" + PosMessage.INVOICE, new Invoice(cr.Document));

            if (docTypes.Count > 0)
            {
                cr.State = ListDocument.Instance(docTypes, new ProcessSelectedItem <SalesDocument>(cr.ChangeDocumentType));
                DisplayAdapter.Customer.Clear();
            }
            else
            {
                cr.State = AlertCashier.Instance(new Confirm(PosMessage.DOCUMENT_NOT_BE_TRANSFERRED));//:to do: do better
            }
        }