Esempio n. 1
0
        public decimal calcCommissionGross(decimal unitsSold, decimal unitPrice)
        {
            paycheck = new Paycheck();

            UnitsSold = unitsSold;
            UnitPrice = unitPrice;

            return(Gross = (UnitsSold * UnitPrice) * Rate);
        }
Esempio n. 2
0
        public decimal calcHourlyGross(decimal week1, decimal week2, decimal rate)
        {
            paycheck = new Paycheck();

            Rate = rate;
            decimal temp1 = 0m;
            decimal temp2 = 0m;

            if (week1 > 40)  //  Week1 overtime check
            {
                OTHoursW1 = week1 - 40;
                OTPayW1   = OTHoursW1 + (rate * 1.5m);

                temp1 = (week1 * rate) + OTPayW1;
            }

            if (week1 <= 40) // Week1 no overtime
            {
                Week1 = week1;
                temp1 = (week1 * rate);
            }
            if (week2 > 40)  // Week2 overtime check
            {
                OTHoursW2 = week2 - 40;
                OTPayW2   = OTHoursW2 + (rate * 1.5m);

                temp2 = (week2 * rate) + OTPayW2;
            }
            if (week2 <= 40)  // Week2 no overtime
            {
                Week1 = week2;
                temp2 = (week2 * rate);
            }

            Gross = temp1 + temp2;  // Gross pay, adding both weeks pay together

            return(Gross);
        }
Esempio n. 3
0
        public decimal CalcSalaryGross(decimal week1Hours, decimal week2Hours, decimal rate)
        {
            paycheck = new Paycheck();

            PTO = 1000;

            decimal ptoUsed;

            if (week1Hours < 40)
            {
                ptoUsed = 40 - week1Hours;
                PTO     = PTO - ptoUsed;
            }

            if (week2Hours < 40)
            {
                ptoUsed = 40 - week2Hours;
                PTO     = PTO - ptoUsed;
            }

            Gross = Rate * 2;

            return(Gross);
        }