Exemple #1
0
        public List <Earnings> RunBarCheckout(decimal serverTips, int barbackCount)
        {
            if (this.CheckoutHasBeenRun == true)
            {
                this.ResetTipout();
            }

            decimal combinedBarAndServer = serverTips;
            decimal barCash = 0;

            foreach (Checkout c in Checkouts)
            {
                combinedBarAndServer += c.CcAutoGrat + c.CcTips + c.CashAutoGrat;
                barCash += c.CashTips;
            }
            if (barbackCount == 1)
            {
                TipOut.BarBackTipOut = TipOutCalculator.CalculateTipOut(combinedBarAndServer, .1m, 0);
            }
            else
            {
                TipOut.BarBackTipOut = TipOutCalculator.CalculateTipOut(combinedBarAndServer, .15m, 0);
            }

            TipOut.BarBackCashTipOut = TipOutCalculator.CalculateTipOut(barCash, .1m, 0);

            return(EarningsCalculator.CalculateEarnings(this.Checkouts, this.TipOut, serverTips, this.ShiftDate, this.LunchOrDinner));
        }
Exemple #2
0
        public List <Earnings> RunCheckout()
        {
            if (CheckoutHasBeenRun == true)
            {
                ResetTipOuts();
            }

            foreach (Checkout c in CheckOuts)
            {
                // first reset these values to be sure no old data is being processed
                TeamSaSpecialLine  = 0;
                TeamBarSpecialLine = 0;

                BottleCount        += c.NumberOfBottlesSold;
                TeamBarSpecialLine += c.BarSpecialLine;
                TeamSaSpecialLine  += c.SaSpecialLine;
            }
            TipOut.FinalTeamBarSales = TipOutCalculator.CalculateTeamBarSales(CheckOuts);
            TipOut.TeamGrossSales    = TipOutCalculator.CalculateTeamGrossSales(CheckOuts);
            TipOut.BarTipOut         = TipOutCalculator.CalculateTipOut(TipOut.FinalTeamBarSales, .05m, TeamBarSpecialLine) + BottleCount;
            TipOut.SaTipOut          = TipOutCalculator.CalculateTipOut(TipOut.TeamGrossSales, .015m, TeamSaSpecialLine);
            List <Earnings> earnings = EarningCalculator.CalculateEarnings(CheckOuts, TipOut, ShiftDate, LunchOrDinner);

            CheckoutHasBeenRun = true;
            return(earnings);
        }