public Transaction ConvertShiftRow(AlohaDataset.adjtimeRow adjtimeRow) { return(new Transaction { Type = TransactionType.ClockInOut, PeriodType = PeriodType.Shift, EmpId = adjtimeRow.employee, SSN = adjtimeRow.ssn, JobCode = adjtimeRow.jobcode, Hours = (adjtimeRow.IshoursNull() ? 0 : adjtimeRow.hours), PayCode = string.Empty, ClockIn = adjtimeRow.sysdatein.AddHours(adjtimeRow.inhour).AddMinutes(adjtimeRow.inminute), ClockOut = adjtimeRow.sysdateout.AddHours(adjtimeRow.outhour).AddMinutes(adjtimeRow.outminute) }); }
public Transaction ConvertTipRow(AlohaDataset.adjtimeRow adjtimeRow, TipCalculation tipCalculationStrategy) { return(new Transaction { Type = TransactionType.PayCode, PeriodType = PeriodType.Unknown, EmpId = adjtimeRow.employee, SSN = adjtimeRow.ssn, JobCode = adjtimeRow.jobcode, Hours = 0m, PayCode = "T", ClockIn = adjtimeRow.date.AddHours(12), Tips = (tipCalculationStrategy == TipCalculation.Auto) ? (adjtimeRow.dectips > adjtimeRow.cctips) ? adjtimeRow.dectips : adjtimeRow.cctips : (tipCalculationStrategy == TipCalculation.CCTips) ? adjtimeRow.cctips : adjtimeRow.dectips }); }