public override void Command() { if (cr.Document.Payments.Count > 0) { throw new InvalidOperationException(); } else { MenuList commandMenu = new MenuList(); int index = 1; commandMenu.Clear(); { if (cr.IsAuthorisedFor(Authorizations.VoidDocument)) { commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.VOID_DOCUMENT)); if (cr.Document is Receipt && cr.Printer.CanPrint(cr.Document)) { commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.SUSPEND_DOCUMENT)); } } } cr.State = CommandMenu.Instance(commandMenu); } }
public override void Command() { MenuList commandMenu = new MenuList(); commandMenu.Clear(); int index = 1; if (cr.IsDesktopWindows) { commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.REPEAT_DOCUMENT)); } commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.RESUME_DOCUMENT)); commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.CUSTOMER_ENTRY)); commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.EFT_POS_OPERATIONS)); if (cr.IsDesktopWindows) { //commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.FAST_PAYMENT)); commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.TABLE_MANAGEMENT)); commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.ENTER_CASH)); commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.RECEIVE_CASH)); //commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.RECEIVE_CHECK)); //commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.RECEIVE_CREDIT)); commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.COMMAND_CALCULATOR)); commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.TALLYING)); } cr.State = CommandMenu.Instance(commandMenu); DisplayAdapter.Customer.Show(PosMessage.WELCOME); }
public override void Command() { MenuList commandMenu = new MenuList(); commandMenu.Clear(); int index = 1; if (cr.IsAuthorisedFor(Authorizations.VoidDocument) || !DisplayAdapter.Both.HasAttribute(DisplayAttribute.CashierKey)) { commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.VOID_DOCUMENT)); if (cr.Document is Receipt && cr.Printer.CanPrint(cr.Document)) { commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.SUSPEND_DOCUMENT)); } } if ((cr.Document is Receipt) && cr.Printer.CanPrint(new Invoice())) { commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.TRANSFER_DOCUMENT)); } if (cr.DataConnector.CurrentSettings.GetProgramOption(Setting.AssingCustomerInSelling) == PosConfiguration.ON) { commandMenu.Add(CommandMenu.AddLabel(index++, PosMessage.CUSTOMER_ENTRY)); } cr.State = CommandMenu.Instance(commandMenu); }
public override void Repeat() { DocumentFileHelper[] orders = DocumentFileHelper.GetOpenOrders(); if (orders.Length > 0) { SalesDocument doc = orders[0].LoadDocument(); String cashiername = doc.SalesPerson.Name; cashiername = cashiername.Substring(0, Math.Min(14, cashiername.Length)); String label = doc.Name.Substring(0, 3) + " NO:{0:D4}\t{1:dd/MM/yy}\n{2}\t{1:HH:mm}"; label = String.Format(label, doc.Id, doc.CreatedDate, cashiername); CommandMenu.RepeatDocument(new MenuLabel(label, orders[0])); } BackgroundWorker.ProcessTcpOrder(); }