Solved

Release time card when end of the month is in the middle of the week

  • 27 November 2023
  • 3 replies
  • 40 views

I work in a construction company and I tried to do a customization on the time card release. Here is the situation, time cards are released weekly and at the end of the month we use it for payroll. Now sometimes last day of the month is actually in the middle of the week (a Wednesday or Thursday). How do I customize the system so that in this kind of cases, I release the time card of that week that day, so that another start for the next month?

icon

Best answer by darylbowman 27 November 2023, 15:36

View original

3 replies

Badge +11

I’m not sure if this is a thought question or if you’re stuck at some point of the process, but putting this in a graph extension for TimeCardMaint should allow you to extend the Release process with your own code:

public delegate IEnumerable ReleaseDelegate(PXAdapter adapter);
[PXOverride]
public virtual IEnumerable Release(PXAdapter adapter, ReleaseDelegate baseMethod)
{
// Execute original method
baseMethod(adapter);

// Add code to create new time card at the appropriate time
}

 

Can you please, give me the whole picture, cause now I’m a bit lost, don’t know where I have to put this codes and how to use it to solve my problem.

Thank you

Badge +11

The code I gave you needs to go in a graph extension for TimeCardMaint. If you don't know what that means, you should probably take the Developer courses to learn the basics of the Acumatica framework if you're going to try to do this yourself.

This code will allow you to override the Release action on Employee Time Cards, which is what I assumed you're trying to do. You would just need to determine the logic of when to create a new time card, which also shouldn't be out of reach if you have experience in the Acumatica framework.

If you don't, I suggest you hire someone, as this community is about helping people grow and not about working for free.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved