ruby code
Ruby
code posted
created at 25 Sep 22:05
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
module PayerHelper def statement_status(job_statement) if(job_statement.status == JobStatement::STATUS::NEW[0]) if(job_statement.due_date >= (Date.today + job_statement.due_date.to_date.cwday + 1).to_time) I18n.t(:"helpers.user.display_job_statement_status.working") elsif(job_statement.due_date < Time.now) I18n.t(:"helpers.user.display_job_statement_status.overdue") else I18n.t(:"helpers.user.display_job_statement_status.due") end elsif(job_statement.status == JobStatement::STATUS::DISPUTED[0] || job_statement.status == JobStatement::STATUS::SUBMITTED[0]) I18n.t(:"helpers.user.display_job_statement_status.disputed") elsif(job_statement.status == JobStatement::STATUS::ACCEPTED[0]) I18n.t(:"helpers.user.display_job_statement_status.submitted") else i18n_symbol(JobStatement::STATUS::STATUS_SELECTOR[job_statement.status][1]) end end end |
984 Bytes in 2 ms with coderay