I'd like to be able to see the account number to be charged for a purchased line item in the PO Line Item Grid. Especially for non-inventory items this would help Purchasing and Accounting make sure the correct account is billed for a line item.
This could possibly be implemented by pulling that info from the Purchase Line Distribution Entry window or adding a hook for an spcp custom procedure to allow showing additional custom fields in the Grid.
For those following along at home, I created two UDF's, with the following UDF Calculations:
Account Number
(SELECT TOP 1 ACTNUMST FROM (
SELECT
pli.PONUMBER
,pli.ORD
,pli.POTYPE
,aim.ACTNUMST
FROM
POP10110 (NOLOCK) AS pli
LEFT JOIN GL00105 (NOLOCK) AS aim ON pli.INVINDX = aim.ACTINDX
UNION ALL
SELECT
pli.PONUMBER
,pli.ORD
,pli.POTYPE
,aim.ACTNUMST
FROM
POP30110 (NOLOCK) AS pli
LEFT JOIN GL00105 (NOLOCK) AS aim ON pli.INVINDX = aim.ACTINDX
) A
WHERE
A.PONUMBER = b.PO_Number
AND A.ORD = b.Line_Seq)
Account Name
(SELECT TOP 1 ACTDESCR FROM (
SELECT
pli.PONUMBER
,pli.ORD
,pli.POTYPE
,am.ACTDESCR
FROM
POP10110 (nolock) AS pli
LEFT JOIN GL00100 (nolock) AS am ON pli.INVINDX = am.ACTINDX
UNION ALL
SELECT
pli.PONUMBER
,pli.ORD
,pli.POTYPE
,am.ACTDESCR
FROM
POP30110 (nolock) AS pli
LEFT JOIN GL00100 (nolock) AS am ON pli.INVINDX = am.ACTINDX
) A
WHERE
A.PONUMBER = b.PO_Number
AND A.ORD = b.Line_Seq)
Hope others find it useful!
Thank you for this idea! Given the separation of concerns needed here, and the higher security levels needed to view/edit this financial information, plus the fact that PO line distributions are already visible and/or editable based on configuration via the Purchase Line Distribution Entry plugin, we are unlikely to add this information to the main Purchase Entry > Line Items grid.
However, you should be able to work around this and provide this visibility for your users with a PO line calculated UDF! The SQL for the calculated UDF would need to use the INVINDX from POP10110 for open PO lines (or POP30110 for historical PO lines), and cross-reference that with GL00100 if you would like it to show the full account number instead of the account index. That would provide readonly visibility of the inventory account assigned to the PO line. UDFs can also be configured so they are only visible for particular users/groups via the View Permissions in the User Field Editor, so you can make sure that only approved personnel can see this information.
If you would like our assistance creating this calculated UDF, just reach out to your account executive or connect with us here: https://www.cavallo.com/request-for-service/