I do have a task to create a report containing informaction from GeneralJournalAccountEntry and InventTrans and InventSettlement, I do use InventTransPosting and InventTransOrigin for relation.
Is there a way to identify what itemId is linked to Mainaccount or GeneralJournalAccountEntry.recid? RIght now I have a ton of duplicates for every row number that is related to inventtrans. The worste it goes when I want to get InvenSettlement data where I can have 300 rows to one inventtransId.
The AccounClosing is the worst since one closingId is like 500 GeneralJournalAccountEntry rows and with like 100k inventtrans it goes insane when creating a view with it.
I believe that the requirement doesn't make sense. You can't meaningfully connect every accounting transaction to an item, because many have nothing to do with items at all.
Yes, I need the whole accounting table and all transactions connected with itemId. My business want to know precisely what items on what accounts are posted and what look on the accountingCurrencyAmount with inventtrans and inventsettlement values I belive it was CostAmountPhysical? ANd yes thats the problem for me because like InventClosing the relation is really bad and the AdjustmentAmount is something I dont even understand since for one InventTransId there can be 200 rows in InventSettlement where the values can swap by 0.01 and 0.00 values inbetween... Tried to create a view and it barely made it worth but the amount of duplicates comming with it was too high to handle. 700 mil rows and I didnt even went for InventSettlement...
You can't solve it just from the technical perspective. Many entries is accounting are not related to items at all or only vaguely. You need to think about what you want to get from the business point of view. For example, results of which postings you're interested in.
André Arnaud de Cal...
292,160
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156