public double CalculateDeduction(PayCheck payCheck) { int fridays = NumberOfFridays(payCheck.StartDay, payCheck.PayDay); double allDues = CalculateAllDues(fridays); double allServiceCharges = CalculateAllServiceCharges(payCheck.StartDay, payCheck.PayDay); return(allDues + allServiceCharges); }
public void PayDay(PayCheck payCheck) { double grossPay = classification.Calculate(payCheck); double deductions = affiliation.CalculateDeduction(payCheck); double netPay = grossPay - deductions; payCheck.GrossPay = grossPay; payCheck.Deductions = deductions; payCheck.NetPay = netPay; method.Pay(payCheck); }
public double Calculate(PayCheck payCheck) { double totalPay = 0; foreach (TimeCard timeCard in timeCards.Values) { if (DateUtil.IsInPayPeriod(payCheck.StartDay, payCheck.PayDay, timeCard.Date)) { totalPay += CalulatePayForTimeCard(timeCard); } } return(totalPay); }
public double Calculate(PayCheck payCheck) { double salesTotal = 0; foreach (SalesReceipt salesReceipt in salesReceipts.Values) { if (DateUtil.IsInPayPeriod(payCheck.StartDay, payCheck.PayDay, salesReceipt.Date)) { salesTotal += salesReceipt.Amount; } } return(baseRate + (salesTotal * commissionRate * 0.01)); }
public override void Execute() { empIds = GetEmployeeIds(); Employee emp; PayCheck payCheck; foreach (int empId in empIds) { emp = database.GetEmployee(empId); if (emp.IsPayDate(payDay)) { DateTime startDay = emp.GetStartDay(payDay); payCheck = new PayCheck(startDay, payDay); payChecks[empId] = payCheck; emp.PayDay(payCheck); } } }
public void Pay(PayCheck payCheck) { throw new NotImplementedException(); }
public void Pay(PayCheck payCheck) { payCheck.SetField("Disposition", "Mail"); }
public double Calculate(PayCheck payCheck) { return(salary); }
public double CalculateDeduction(PayCheck payCheck) { return(0); }