Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果有人到職日是2/29 LeaveTimeBatchBuilder 會4年才幫他重新計算可用請假額度 #242

Open
telsaiori opened this issue Dec 6, 2017 · 0 comments

Comments

@telsaiori
Copy link
Contributor

雖然現在LeaveTimeBatchBuilder好像還沒有在自動執行
本來的目的應該是讓他自動去找誰60天後會滿週年,然後自動幫他重新算請假額度.
(除非執行的時候硬把forced設成true)

  scope :filter_by_join_date, ->(month, date) {
    where(
      '(EXTRACT(MONTH FROM join_date), EXTRACT(DAY FROM join_date)) = (:month, :date)',
      month: month, date: date
    )
  }

這樣如果有人真的是2/29到職的話,閏年以外的年份上面那一段永遠不會把他撈出來

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant