frappe / hrms

Open Source HR and Payroll Software
https://frappe.io/hr
GNU General Public License v3.0
1.26k stars 651 forks source link

Expire Carry Forwarded Leaves (Days) #133

Open mastewalm opened 2 years ago

mastewalm commented 2 years ago

Information about bug

the Expire Carry Forwarded Leaves (Days) is not working as expected, in my opinion. I think, if I insert 365 days as a value, it should carry forward the allocated amount or the remainder after the leave application for that number of days, and those leaves that are allocated but have already passed 365 days should be expired. but in my case, if I put 365 as a value, all the allocations will be active; if I put 364 or less, only the current period allocation will be active. Is this how the system is supposed to work or is there a workaround?

Module

HR

Version

Frappe Version - 13.38 and above Erpnext version - 13.36 and above

Installation method

No response

Relevant log output / Stack trace / Full Error Message.

No response

dj12djdjs commented 2 years ago

@mastewalm Could you provide more information, I'm trying to understand this problem. I'm unsure what 365 is being assigned to.

Could you provide a full example? Creating: leave type, leave allocation, etc.. Expected results, and actual results?

mastewalm commented 2 years ago

Thank you for your response

In my company, leaves are carried forward for 2 years. I was testing the ERPNext system with 1 year carry forward, which is 365 days. So if I use a number of days less than a year, it works. But if the number of days is 365 (which as I said is 1 year) or more, it doesn't work as expected. To clarify: for example I created 3 leave allocation. period 1 from july 1, 2020 to june 30, 2021 and allocation amount 30 days period 2 from july 1, 2021 to june 30, 2022 and allocation amount 31 days and period 3 from july 1, 2022 to june 30, 2023 and allocation amount 32.

In this example, the total allocation is 93 days. As I mentioned above, the "Expire Carry Forwarded Leaves (Days)" is set for 365 days. Based on the given, since the difference between now and the first period on the example, which is from july 1 , 2020 to june 30, 2021, is more than 365 days it should be expired and the allocation balance should be 63. But as I already said, if the "Expire Carry Forwarded Leaves (Days)" is set for 365 days or more, none of the allocations expire.

For more clarity I have attached 2 zipped files containing screen shots of both cases, one with "Expire Carry Forwarded Leaves (Days)" set for less than a year and one with just a year.

Regards, Mastewal

On Wed, Aug 31, 2022 at 4:57 AM Devin Slauenwhite @.***> wrote:

@mastewalm https://github.com/mastewalm Could you provide more information, I'm trying to understand this problem. I'm unsure what 365 is being assigned to.

Could you provide a full example? Creating: leave type, leave allocation, etc.. Expected results, and actual results?

— Reply to this email directly, view it on GitHub https://github.com/frappe/hrms/issues/133, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLUBLUEYC4GL6QGXSNJOFLV323W7ANCNFSM57OM27FQ . You are receiving this because you were mentioned.Message ID: @.***>

mastewalm commented 2 years ago

6 7 8 9 10 11

the first leave allocation should have expired.

mastewalm commented 2 years ago

should I expect a solution? because I really need one.

dj12djdjs commented 2 years ago

I'll try CC the code owner for this module since this issue is still open. CC: @ruchamahabal

Do you have any comment for this: https://github.com/frappe/hrms/issues/45#issuecomment-1233622086

mastewalm commented 2 years ago

@ruchamahabal closed this: https://github.com/frappe/hrms/issues/45#issuecomment-1233622086

I was trying to respond through email and did not check the page. because of that, the images I sent were not visible. should I attach the images even if @ruchamahabal closed it?

dj12djdjs commented 2 years ago

@mastewalm Since this issue is open, you can post them here for another reference of expected behavior.

mastewalm commented 2 years ago

@dj12djdjs In that case, you have understood and put it as I expect the system to perform in this: https://github.com/frappe/hrms/issues/45#issuecomment-1233622086

and as you have seen above on this page, I have attached images for more clarification. I hope it will be resolved.

Thank you for your time and responce.

mastewalm commented 1 year ago

@dj12djdjs: I am still waiting for a response but @ruchamahabal is not responding. Any idea?

ruchamahabal commented 1 year ago

Hello, we will check this issue and respond. Please close all the duplicate ones

mastewalm commented 1 year ago

@ruchamahabal: ok thanks.

mastewalm commented 1 year ago

Greetings @ruchamahabal Any update on this issue?

mastewalm commented 1 year ago

Greetings @deepeshgarg007 Please tell me if there is any progress on this issue.

mastewalm commented 1 year ago

Any hope for this issue?

mastewalm commented 6 months ago

Please if there is any means for you to check this issue.