8000 Added logic for days per week and day per year leave scenerio by SiddharthShringi · Pull Request #1720 · saeloun/miru-web · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added logic for days per week and day per year leave scenerio #1720

New issue
Merged
merged 7 commits into from
Mar 20, 2024

Conversation

SiddharthShringi
Copy link
Contributor

No description provided.

@SiddharthShringi SiddharthShringi force-pushed the leave-balance-issue-days-per-week branch from c9146fc to f22db20 Compare March 19, 2024 10:40
@SiddharthShringi SiddharthShringi marked this pull request as ready for review March 19, 2024 10:42
Comment on lines 175 to 177
current_date = DateTime.now
current_year = current_date.year
current_month = current_date.month
Copy link
8000
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define this on top & reuse the same in each method

def quarter_position_and_after_mid_quarter(date)
case date.month
when 1..3
quarter = 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quarter = (date.month / 3.0).ceil

case date.month
when 1..3
quarter = 1
mid_date = Date.new(date.year, 1, 1) + 1.month + 15.days # January 15th
Copy link
Collaborator
@nisusam nisusam Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mid_ A4AB date = Date.new(date.year, (((quarter - 1) * 3) + 2, 1) + 15.days

@apoorv1316 apoorv1316 merged commit f731246 into develop Mar 20, 2024
@apoorv1316 apoorv1316 deleted the leave-balance-issue-days-per-week branch March 20, 2024 13:59
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

Successfully merging this pull request may close these issues.

3 participants
0