Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

How to get hrs_type and shift code to Flexible Billings

(0) ShareShare
ReportReport
Posted on by 152

We are using SL 2015 and are looking at implementing Time Entry. On the invoices in Flexible Billings I wanted to be able to show whether time was ST, OT, Night Shift, etc. but I don't see an easy way to do it.

When time goes to PJTRAN from Time Entry the hours type (REG, OT1, or OT2) and shift code are stored in tr_id24. I thought I could just choose tr_id24 as an ID field to load in Billings Setup but, of the many fields available, tr_id24 is not one.

There must be something obvious I am missing because I can't imagine anyone not wanting to show straight time separately from overtime on their invoices.

Any suggestions on how to get the hours type and shift codes on the invoice?

*This post is locked for comments

  • JohnTwohig Profile Picture
    152 on at
    RE: How to get hrs_type and shift code to Flexible Billings

    Thanks for the suggestion.

    I think it would work but the invoice reports aren't the fastest to begin with so I wanted to avoid adding another join to them.

    What we finally arrived at was to put a trigger on PJTranex that takes the value in tr_id24 and puts it in tr_id21 and then added tr_id21 as an ID field in Transaction Load Options in Billings Setup. That way the field ends up in PJInvdet and can be used on the invoice.

  • Community Member Profile Picture
    on at
    RE: How to get hrs_type and shift code to Flexible Billings

    idk what would work best but I can think of a few things to try assuming you are doing everything in detail in pjtran and inv detail.  You could join pjtran in the report - although I am not sure enough about the join capabilities of Crystal to tell you how.  Or you could create a sub report with PJtran as the source of the sub report and pass the pjinvdet.in_id02 field in to the sub report.  Then using the record selection fomula break the id_id02 field apart to filter down to the single PJTRAN record that it was created from.  Or... you could create a view using the SQL below and set the datasource of pjinvdet to point to the view instead of the table of that name (<- not sure if this will kill ROI)  If it does, then change the view to only have the key pjinvdet fields and the pjtran fields you need and add it to the report and link it to pjinvdet.  

    select t.tr_id24, d.*

    from pjinvdet d

    inner join pjtran t on t.fiscalno = left(in_id12,6) and t.system_cd = SUBSTRING(in_id12, 7,2) and batch_id = SUBSTRING(in_id12,9,10) and detail_num = SUBSTRING(in_id12,19,10)

    Hope this helps...

    btw while I tested the query enough to make sure it works for me with my data - idk your data or setup enough to promise anything.  Use at your own risk.

    Ayrin

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans