public override PayrollResult Evaluate(PayrollPeriod period, PayTagGateway tagConfig, IDictionary <TagRefer, PayrollResult> results) { TimesheetResult resultTimesheet = (TimesheetResult)GetResultBy(results, TAG_TIMESHEET_WORK); int resultHours = resultTimesheet.Hours() + Hours; var resultValues = new Dictionary <string, object>() { { "hours", resultHours } }; return(new TermHoursResult(TagCode, Code, this, resultValues)); }
private decimal ComputeResultValue(PayTagGateway tagConfig, IDictionary <TagRefer, PayrollResult> results) { TimesheetResult resultTimesheet = (TimesheetResult)GetResultBy(results, TAG_TIMESHEET_PERIOD); TermHoursResult resultWorking = (TermHoursResult)GetResultBy(results, TAG_HOURS_WORKING); TermHoursResult resultAbsence = (TermHoursResult)GetResultBy(results, TAG_HOURS_ABSENCE); decimal scheduleFactor = 1.0m; int timesheetHours = resultTimesheet.Hours(); int workingHours = resultWorking.Hours; int absenceHours = resultAbsence.Hours; decimal paymentValue = ComputeResultPayment(AmountMonthly, scheduleFactor, timesheetHours, workingHours, absenceHours); return(paymentValue); }