示例#1
0
        private static void VoidTicket(Ticket selectedTicket)
        {
            // Print out hard copys for record keeping
            PrinterManager.Print(selectedTicket, TicketItemPrintOptions.AllAsVoid);

            double amount = selectedTicket.GetSubTotal();

            TicketVoid.Add(SessionManager.ActiveEmployee.Id, selectedTicket.PrimaryKey, null, amount);

            ClearTicketCoupons(selectedTicket.PrimaryKey);
            ClearTicketDiscounts(selectedTicket.PrimaryKey);

            TicketDelivery.DeleteByTicket(selectedTicket.PrimaryKey);
            foreach (TicketItem ticketItem in
                     TicketItem.GetAll(selectedTicket.PrimaryKey))
            {
                bool updateInventory = !(ticketItem.IsCanceled && !ticketItem.IsWasted);
                ticketItem.Delete(updateInventory);
            }
            TicketManager.Delete(selectedTicket.PrimaryKey);
        }
示例#2
0
 private static void ResetTransactionalTables()
 {
     SettingManager.SetStoreSetting("DailyIdOffset", 0);
     DayOfOperation.Reset(typeof(DayOfOperation));
     EmployeeTimesheet.Reset(typeof(EmployeeTimesheet));
     EmployeeTimesheetChangeLog.Reset(typeof(EmployeeTimesheetChangeLog));
     Lock.Reset(typeof(Lock));
     Party.Reset(typeof(Party));
     PartyInvite.Reset(typeof(PartyInvite));
     RegisterDeposit.Reset(typeof(RegisterDeposit));
     RegisterDrawer.Reset(typeof(RegisterDrawer));
     RegisterDrop.Reset(typeof(RegisterDrop));
     RegisterNoSale.Reset(typeof(RegisterNoSale));
     RegisterPayout.Reset(typeof(RegisterPayout));
     Ticket.Reset(typeof(Ticket));
     TicketCoupon.Reset(typeof(TicketCoupon));
     TicketDiscount.Reset(typeof(TicketDiscount));
     TicketItem.Reset(typeof(TicketItem));
     TicketItemOption.Reset(typeof(TicketItemOption));
     TicketItemReturn.Reset(typeof(TicketItemReturn));
     TicketPayment.Reset(typeof(TicketPayment));
     TicketRefund.Reset(typeof(TicketRefund));
     TicketVoid.Reset(typeof(TicketVoid));
 }