Skip to main content
Solved

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


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?

Best answer by darylbowman

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
}

 

View original
Did this topic help you find an answer to your question?

3 replies

darylbowman
Captain II
Forum|alt.badge.img+13
  • 1682 replies
  • Answer
  • November 27, 2023

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
}

 


  • Author
  • Freshman I
  • 2 replies
  • November 29, 2023

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


darylbowman
Captain II
Forum|alt.badge.img+13

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings