我知道有很多類似的問題,但不幸的是,他們都沒有回答我的問題。對於VendInvoiceTrans,您可以轉到InventTransPosting,其中LedgerDimension和DefaultDimension駐留在一個表中,並且您可以使用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!);
或者,你可以使用accountingDistribution框架非常久遠SubledgerJournalAccountEntry找到generalJournalAccountEntry針對特定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類似的東西。有沒有
1)任何表(像InventTransPosting爲VendInvoiceTrans),用於保存已發佈的invoiceTransactions及其默認維度或ledgerDimensions的跟蹤。 CustInvoiceTrans.LedgerDimension只顯示主帳戶,但我需要一些表,其中分類帳維度字段將有更多信息。
,或者
2)的任何表(如SubledgerJournalAccountEntryDistribution),即保持generalJournalAccountEntry和sourceDocumentLine的軌跡。