//Finish Order void _buttonKeyFinishOrder_Clicked(object sender, EventArgs e) { try { //Call Framework FinishOrder OrderMain orderMain = GlobalFramework.SessionApp.OrdersMain[GlobalFramework.SessionApp.CurrentOrderMainOid]; FIN_DocumentOrderTicket orderTicket = orderMain.FinishOrder(GlobalFramework.SessionXpo); // If OrderTicket and has a ThermalPrinter connected if (orderTicket != null && GlobalFramework.LoggedTerminal.Printer != null && GlobalFramework.LoggedTerminal.Printer.PrinterType.ThermalPrinter) { //public static bool PrintOrderRequest(Window pSourceWindow, SYS_ConfigurationPrinters pPrinter, OrderMain pDocumentOrderMain, FIN_DocumentOrderTicket pOrderTicket) FrameworkCalls.PrintOrderRequest(_sourceWindow, GlobalFramework.LoggedTerminal.Printer, orderMain, orderTicket); FrameworkCalls.PrintArticleRequest(_sourceWindow, orderTicket); } //Change Mode _listMode = TicketListMode.OrderMain; //Reset TicketList TotalItems Counter _listStoreModelTotalItemsTicketListMode = 0; UpdateOrderStatusBar(); UpdateModel(); } catch (Exception ex) { _log.Error(ex.Message, ex); } }
//Finish Order void _buttonKeyFinishOrder_Clicked(object sender, EventArgs e) { try { //Call Framework FinishOrder OrderMain orderMain = GlobalFramework.SessionApp.OrdersMain[GlobalFramework.SessionApp.CurrentOrderMainOid]; //CurrentOrderDetailsAll = CurrentOrderDetails; /* * TK013134 * Parking Ticket Module: Checking for duplicates in Order Main after finishing order */ if (GlobalFramework.AppUseParkingTicketModule) { orderMain.CheckForDuplicatedArticleInArticleBag(GlobalFramework.SessionXpo); } fin_documentorderticket orderTicket = orderMain.FinishOrder(GlobalFramework.SessionXpo); // If OrderTicket and has a ThermalPrinter connected // Impressoras - Diferenciação entre Tipos [TK:016249] GlobalFramework.UsingThermalPrinter = true; if (orderTicket != null && GlobalFramework.LoggedTerminal.Printer != null && GlobalFramework.LoggedTerminal.ThermalPrinter != null && GlobalFramework.LoggedTerminal.ThermalPrinter.PrinterType.ThermalPrinter && orderTicket.OrderDetail.Count != 0) { //public static bool PrintOrderRequest(Window pSourceWindow, sys_configurationprinters pPrinter, OrderMain pDocumentOrderMain, fin_documentorderticket pOrderTicket) //IN009239 - This avoids orders being printed when in use of ParkingTicketModule if (!GlobalFramework.AppUseParkingTicketModule) { // TK016249 Impressoras - Diferenciação entre Tipos FrameworkCalls.PrintOrderRequest(_sourceWindow, GlobalFramework.LoggedTerminal.ThermalPrinter, orderMain, orderTicket); } FrameworkCalls.PrintArticleRequest(_sourceWindow, orderTicket); } //Change Mode _listMode = TicketListMode.OrderMain; //Reset TicketList TotalItems Counter _listStoreModelTotalItemsTicketListMode = 0; UpdateOrderStatusBar(); UpdateModel(); } catch (Exception ex) { _log.Error(ex.Message, ex); } }