GL account transaction with Project accounting ‘project’ linked

  • GL account transaction with Project accounting ‘project’ linked

    Posted by Deanne Rasmussen on January 3, 2024 at 4:29 pm

    Need sql query to link the project entered in PM – invoice expense charged to a PA project. I’ve got all the GL info and ‘originating’ fields. Can anyone guide me to linking the actual project that was charged?

    Beat Bucher replied 3 months ago 5 Members · 15 Replies
  • 15 Replies
  • Samantha Higdon

    Member
    January 3, 2024 at 4:43 pm
    Up
    0
    Down
    ::

    Hi Deanne,

    Can you confirm what you mean when you say PM-Invoice? What screen are you using? Most payables related to project accounting start life in the Purchasing side of the house (PO’s or Receivings Transaction Entry).

    I’ve written several things for clients who use project accounting, but knowing what screen your invoices originate on will help me hone in on what window (and by extension which tables) you need.

    Best,

    Samantha

    • Deanne Rasmussen

      Member
      January 4, 2024 at 9:18 am
      Up
      0
      Down
      ::

      The exact screen I’m referring to is: Purchasing Invoice Inquiry Zoom

      You get there through the Payable Transaction Inquiry – Vendor screen by selecting the Document Number link

  • Deanne Rasmussen

    Member
    January 3, 2024 at 5:26 pm
    Up
    0
    Down
    ::

    PM invoice – AP invoice – that is the originating doc number that carries over to the GL. I just need the project that was entered/selected when the PO/AP invoice is entered.

    • Samantha Higdon

      Member
      January 3, 2024 at 5:28 pm
      Up
      0
      Down
      ::

      Deanne,

      Can you confirm where that invoice is originally entered? Receivings Transaction Entry or Payables Transaction Entry? Those are different windows with different tables. We need to know if you use one or both to know what tables need to be used.

      • Deanne Rasmussen

        Member
        January 4, 2024 at 7:37 am
        Up
        0
        Down
        ::

        I want to use both receivings/invoice transactions.

        • Samantha Higdon

          Member
          January 4, 2024 at 8:44 am
          Up
          0
          Down
          ::

          Hi Deanne,

          Kerry Hataley has given you a great starting point with the PA30XXXXXX tables – if you’re talking the receivings transactions specifically, I would look at the PA301101, PA31102 and PA31103 tables.

          The PA11800 and PA11801 are my go to tables as well because they combine history information for you. Based on your replies though it sounds like your folks aren’t running the Combine History Utility (the process Kerry Hataley is talking about) to make those tables usable. I’d look into having them run that utility as well.

          If that doesn’t get you what you need, there are some things you can do with different views to combine things, but bout 95% of the time the two groups of tables above will get the job done when combined with GL information.

  • Kerry Hataley

    Organizer
    January 3, 2024 at 6:14 pm
    Up
    0
    Down
    ::

    All the detail information will be in the PA tables. Specifically PA30xxx for what I think you are trying to accomplish… but your references are very vague.

    You are NOT telling us field names…

  • Kerry Hataley

    Organizer
    January 3, 2024 at 6:17 pm
    Up
    0
    Down
    ::

    BTW personally, I always use the Combined History Tables PA11800 and PA11801.

    They give you everything you need…

    As long as they are running the process.

    • Deanne Rasmussen

      Member
      January 4, 2024 at 7:36 am
      Up
      0
      Down
      ::

      Thank you Kerry.

      If I have a transaction from payables (receiving/invoice), I want to report the project number from project accounting. I know I was vague – sorry about that – I have all the GL transactions and originating info from payables.

    • Deanne Rasmussen

      Member
      January 4, 2024 at 7:46 am
      Up
      0
      Down
      ::

      The PA11800 and PA11801 tables are empty – what ‘process’ are you referring to? (this company is barely using all the GP functionality – project accounting is a dumping ground for tracking project costs. they don’t bill anything to customers)

  • Jo deRuiter

    Member
    January 4, 2024 at 9:40 am
    Up
    0
    Down
    ::

    Hi Deanne:

    Here is a script that I use to report on everything project. The piece to report on the link between project and Purchase Invoices is towards the bottom, but here is that snippet.

    The entire script will report on ALL types of project transactions even linking them to the Journal Entry Number, but here is the Purchase piece of it:

    SELECT PH.[Customer Number]

    ,CUS.[Customer Name]

    ,PH.[Contract Number]

    ,PH.[Contract ID]

    ,PH.[Project ID]

    ,PH.[Project Name]

    ,PH.[Project Number]

    ,PH.[Project Class ID]

    ,PH.[Project Type]

    ,PH.[Accounting Method]

    ,PH.[Status]

    ,PH.[Department]

    ,PH.[Estimator ID]

    ,PH.[Project Manager ID]

    ,PH.[Business Manager ID]

    ,PH.[Location ID]

    ,PH.[Salesperson ID]

    ,’Purchasing’ as ‘Transaction Type’

    ,ATR.[Journal Entry]

    ,RCT.[PAVIDN]’Transaction Number’

    ,RCT.[ITEMNMBR]’Master Record’

    ,POP.VENDNAME ‘Master Record Detail’

    ,POP.REFRENCE ‘Reference’

    ,POP.VNDDOCNM AS ‘Vendor Doc Number’

    ,” as ‘Submodule Reference’

    ,POL.PONUMBER as ‘PO Number’

    ,CASE POP.POPTYPE

    WHEN 1 THEN ‘Shipment’

    WHEN 2 THEN ‘Invoice’

    WHEN 3 THEN ‘Shipment/Invoice’

    WHEN 4 THEN ‘Return’

    WHEN 5 THEN ‘Return w/ Credit’

    WHEN 6 THEN ‘IV Return’

    WHEN 7 THEN ‘IV Return w/ Credit’

    WHEN 8 THEN ‘In-Transit Inventory’

    END as ‘Receipt Type’

    ,APP.APFRDCNM ‘Receipt Paid with Check Number’

    ,APP.DOCDATE as ‘Check Paid Date’

    ,POP.[GLPOSTDT] ‘ Transaction Date’

    ,RCT.[PACOSTCATID] ‘Cost Category’

    ,AC.[Account Number] AS ‘COGS Account’

    ,AC.[Account Description] AS ‘COGS ACCT Desc’

    ,CASE WHEN POP.POPTYPE IN (5,4,6,7) THEN RCT.[PABase_Qty]*-1 ELSE RCT.[PABase_Qty] END AS ‘Quantity’

    ,RCT.[UOMSCHDL] as ‘U of M’

    ,CASE WHEN POP.POPTYPE IN (5,4,6,7) THEN RCT.[PABase_Unit_Cost]*-1 ELSE RCT.[PABase_Unit_Cost] END ‘UNITCOST’

    ,RCT.[PATOTALOVERH]’Total Overhead’

    ,CASE WHEN POP.POPTYPE IN (5,4,6,7) THEN RCT.[PAShipmentExtCost]*-1 ELSE RCT.[PAShipmentExtCost] END AS ‘Extended Cost’

    ,CASE WHEN POP.POPTYPE IN (5,4,6,7) THEN RCT.[PAShipmentExtCost]*-1 ELSE RCT.[PAShipmentExtCost] END ‘Total Cost’

    ,CASE WHEN POP.POPTYPE IN (5,4,6,7) THEN POP.[SUBTOTAL]*-1 ELSE POP.[SUBTOTAL]END AS ‘Total of Invoice’

    ,RCT.[PAORIGBILLRATE]’Billing Rate Per Unit’

    ,RCT.[PAORIACCRREV]’Recognized Revenue’

    ,RCT.[PABilled_QtyN]’Billed Quanitity’

    ,RCT.[PA_Billed_Profit_Amount_] ‘Billed Profit’

    ,RCT.[PABilled_Amount]’Total Billed’

    ,RCT.[PABilledProfitPercentage] as ‘Billed Frieght’

    ,RCT.[PABilled_Discount] ‘Billing Discount’

    ,RCT.[PABilling_StatusN]’Billing Status’

    FROM [PAProjects] PH LEFT JOIN

    [Customers] CUS ON PH.[Customer Number]=CUS.[Customer Number] LEFT JOIN

    [PA31102] RCT ON PH.[Project Number]=RCT.[PAPROJNUMBER] LEFT JOIN

    [PA31101] RCH ON RCT.[PAVIDN]=RCH.PAVIDN LEFT JOIN

    [POP30300] POP ON RCT.PAVIDN=POP.POPRCTNM LEFT JOIN

    [POP30310] POL ON RCT.PAVIDN=POL.POPRCTNM AND RCT.RCPTLNNM=POL.RCPTLNNM AND RCT.ITEMNMBR=POL.ITEMNMBR LEFT JOIN

    (SELECT * FROM PM30300 WHERE APTODCNM IN (SELECT TOP 1 (APTODCNM) FROM PM30300 GROUP BY APTODCNM))

    as APP ON POP.VNDDOCNM =APP.APTODCNM and POP.VENDORID=APP.VENDORID LEFT JOIN

    –[PM30300] APP ON POP.VNDDOCNM =APP.APTODCNM and POP.VENDORID=APP.VENDORID LEFT JOIN

    [Accounts] AC on RCT.PACogs_Idx=AC.[Account Index]LEFT JOIN

    [AccountTransactions] ATR ON ATR.[Journal Entry]=(select TOP 1 ATR.[Journal Entry] WHERE RCT.PAVIDN=ATR.[Originating Document Number] AND RCT.PACogs_Idx=ATR.[Account Index] )

    WHERE RCT.[PAVIDN] IS NOT NULL

    AND POP.[GLPOSTDT] IS NOT NULL

    and POP.POPRCTNM <> ‘RCT100153’

    • Deanne Rasmussen

      Member
      January 5, 2024 at 7:36 am
      Up
      0
      Down
      ::

      this is awesome – can I get the entire script? please?

    • Deanne Rasmussen

      Member
      January 5, 2024 at 9:36 am
      Up
      0
      Down
      ::

      Can you resend the script? seems to be a lot of typo’s – doesn’t work in sql

      • Jo deRuiter

        Member
        January 5, 2024 at 9:39 am
        Up
        0
        Down
        ::

        Deanne,

        Send me a quick email at jo.deruiter@aislingdynamics.com and I’ll send you a few scripts that may help

      • Beat Bucher

        Member
        February 7, 2024 at 10:59 pm
        Up
        0
        Down
        ::

        See if that one works..

The discussion ‘GL account transaction with Project accounting ‘project’ linked’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for people  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!