Announcements
The purchase invoice has many item line, each item has a different Posting Group.
After posting the invoice, I don't know how to map between Invoice Line and GL Ledger entry line
Can someone show me how to link them together
Posted Purchase invoice line
General Ledger Entry
You are correct that the setups can be changed, which can change where things post to. And in that case you really can't trace it back unless you keep a log of changes, and try to incorporate that into your linking process.
The link between GL and Invoice is primarily based on Document No. It sounds like you're trying to link inventory transactions, in which case you may find some help by analyzing the Item Ledger Entry and Value Entry tables. These will not help with tracing to proper GL account, but they can help to clarify the inventory value that was posted for each line.
I am very concerned that you state your Inventory Posting Setup is not fixed. If you change the inventory Posting Group on an item, you have a requirement to make an accounting change to keep your subledger and general ledger balanced.
Using the Inventory Posting, General Product Posting Group, General Business Posting and Customer Posting Group will tell you what was used to get the general ledger account. Then as @ZHU shows you in his response, you have all the general ledger entries that were created based on the document number and posting date.
Hi, they are not directly related. If you want to investigate, you can check it in detail according to Document No.
For example,
Hope this helps as well.
Thanks.
ZHU
Thanks Amit, NavNab
The big problem is that the Inventory Posting Setup is not fixed forever, It can be changed. If it is changed, you will not know which line in GL mapping with Invoice line.
Is there another way to know exactly the relationship between to table Invoice Line and GL Ledger Entry ?
Also know this, there are 4 entries made when invoicing inventory items.
Debit to Purchases Account from General Posting Setup
Credit to Accounts Payable from Vendor Posting Setup
Debit to Inventory from Inventory Posting Setup
Credit to Direct Cost Applied from General Posting Setup
Note: do not make purchase account and direct cost applied account the same GL account. They should net to zero but if you make them the same account it is a bit harder to find your problems.
hello
you do not have a direct relationship between the two tables
you should make a customisation
DAniele
You can see the accounts in "General Posting Setup".
Identify the line that corresponds to your "Gen. Bus. Posting Group" (invoice header) and "Gen. Prod. Posting Group" (invoice line). You'll the find the account(s) in the columns. For example: "Purch. Account".
Now that you know the basics you can explore more advanced setup and try to identify "discount accounts" or "COGS accounts" for example.
P.S: The same logic applies to VAT >> see "VAT Posting Setup".
Hi,
Entries created according to the posting groups. for more information. read Purch-Post codeunit.
Regards
Amit Sharma
André Arnaud de Cal...
294,190
Super User 2025 Season 1
Martin Dráb
232,968
Most Valuable Professional
nmaenpaa
101,158
Moderator