Short Version
Is there a way to tell what Main Account an Invoice line in the VendTrans table posted to in the General Journal ... or, if this even makes sense, what Main Account an Invoice in the VendInvoiceJour table posted to in the General Journal?
Long Version
Users want to be able to enter a date range and a main account range: the date range is to limit the results to just those Vouchers that were posted to the General Journal (i.e., GeneralJournalEntry table) between the min and max date. Users want a list of Posted Date, Voucher, Invoice Date, Invoice No, Vendor Account, Vendor Name, and Invoice Amount displayed as the result.
I can easily apply the date range to the GeneralJournalEntry table (I could even apply the Main Account criteria to the GeneralJournalAccountEntry table). However, there is no Invoice information in that table, or any directly related tables.
So I am trying to get the Invoices indirectly, through Vouchers. I join the GeneralJournalEntry table with the SubledgerVoucherGeneralJournalEntry table in order to get a list of Vouchers, and then use those Vouchers to get the associated Invoices from VendTrans.
But what Main Accounts did the Invoices (from VendTrans) post to in the General Journal? I don't see a direct relationship from VendTrans to any table that allows me to determine that. There is a potential join from VendTrans to LedgerJournalTrans to pick up a LedgerDimension, but unfortunately it points to the Vendor AccountNum in the DimensionAttributeValudCombination table, not to the MainAccount+FinancialDimensions.
As alluded to earlier, I could pick up Main Accounts back in the GeneralJournalAccountEntry table, but I don't see a way to relate those records back to VendTrans or LedgerJournalTrans, so that doesn't help.
↧
AX2012R2: Main Accounts Invoices Posted To
↧