Hourly Pay (Timesheet) HT none code result = (contract.wage/payslip.total_hours)*payslip.timesheet_hours if payslip.total_hours else 0.0