When a time card is processed, expense lines get generated automatically. I want the time card part working as it is but not to create expense lines.

Aditya24
Giga Expert

I see that there is a BR named "Process time card" on time card table. Now if I turn it active false, expense lines are not generated but time card also remains in approved state and not go to processed state. 

My concerns are:

1. Is it okay to leave the state as approved and not processed. Will it cause any issue when I turn on that BR "Process time card" again in future? 

2. Is there another way that time card gets to processed state but no expense line is generated?

Please suggest.

1 ACCEPTED SOLUTION

Ok so if you don't want to create the expense line for any task in time card, you can comment the below highlighted line in SI 'TimeCardProcessHandler'.

find_real_file.png

View solution in original post

13 REPLIES 13

Girish20
Tera Expert

Hi Aditya,

If you wish to suppress the expense line generation logic, go to Script include 'TaskRateProcessor' , function 'processTaskTimeCardWithDailyRate' and change the condition to call '_createExpenseLine' function to allow expense line to be created for a specific task type only.

Hi Girish,

I don't want Expense Lines at all. Not finding the code where the task types defines. 

There is another script include "ExpenseLine".

Ok so if you don't want to create the expense line for any task in time card, you can comment the below highlighted line in SI 'TimeCardProcessHandler'.

find_real_file.png

Hi Girish,

At first I had deactivated the BR "Process time card". It stopped creating Expense lines but it also stopped time cards going to processed state and time cards remain in approved only. Now, due to this I was not getting the actuals in the resource plan as the time cards were in approved state. 

Now, as you suggested, I commented that one line of code. Now my time card is getting processed and I am getting actuals and expense lines are not getting generated. So it is all working as expected.

My question here is that "In general there are BR which triggers the record creation in a related table. No such thing here? As I was more comfortable deactivating one BR instead of modifying a code.

Is it okay to do so? or Hiding expense lines can be a better suggestion as Namita mentioned above.

 

Please reply.

 

Thanks 

Hi Aditya,

Not touching OOTB SI is always recommended. So, if hiding the relates list tab solves your purpose, you should give it a preference.

But even if you change the SI, you can handle it manually during upgrades. I don't see any challenge there.