似たような質問がたくさんあることは知っていますが、残念ながら、私の問題に答えている人はいません。 VendInvoiceTransでは、LedgerDimensionとDefaultDimensionが1つのテーブルにあるInventTransPostingにアクセスできます。また、ledgerDimensionを使用して、特定の伝票のGeneralJournalAccountEntryレコードをすべて検索することができます。custinvoiceTransとGeneralJournalAccountEntryとの関係
InventTransPosting = InventTransPosting::find(InventTrans::findTransId(vendInvoiceTrans.InventTransId).DateStatus,
vendInvoiceJour.CostLedgerVoucher,
InventTransOrigin::findByInventTransId(vendInvoiceTrans.inventTransId).RecId,
InventTransPostingType::Financial);
LedgerDimension = InventTransPosting.LedgerDimension;
select generalJournalAccountEntry
where generalJournalAccountEntry.GeneralJournalEntry == SubledgerVoucherGeneralJournalEntry.GeneralJournalEntry
&& generalJournalAccountEntry.LedgerDimension == LedgerDimension
&& (generalJournalAccountEntry.PostingType == WHATEVERPOSTINGTYPE!);
かは、あなたが特定のVendInvoiceTrans.SOURCEDocumentLine
select accountingDistribution
where accountingDistribution.SourceDocumentLine == vendInvoiceTrans.SourceDocumentLine
join subledgerJournalAccountEntryDistribution
where subledgerJournalAccountEntryDistribution.AccountingDistribution == AccountingDistribution.RecId
join GeneralJournalAccountEntry,PostingType
from SubledgerJournalAccountEntry
where SubledgerJournalAccountEntry.RecId == SubledgerJournalAccountEntryDistribution.SubledgerJournalAccountEntry
&& SubledgerJournalAccountEntry.GeneralJournalAccountEntry
&& (SubledgerJournalAccountEntry.PostingType == WHATEVERYOUWANT);
私が興味を持っていることはCustInvoiceTransのための同様のものを見つけることであるためgeneralJournalAccountEntryを見つけることSubledgerJournalAccountEntryを伴って含むaccountingDistributionフレームワークを使用することができます。
1)デフォルトディメンションまたはledgerDimensionsを使用して転記されたinvoiceTransactionsのトラックを保持するテーブル(VendInvoiceTransのInventTransPostingなど)。 CustInvoiceTrans.LedgerDimensionはメインアカウントのみを表示しますが、元帳次元フィールドに詳細情報があるテーブルが必要です。 generalJournalAccountEntryとsourceDocumentLineを追跡
又は、
2)SubledgerJournalAccountEntryDistributionような任意のテーブル()。