많은 유사한 질문이 있다는 것을 알고 있지만, 불행히도 그들 중 누구도 내 문제에 대답하지 않습니다. VendInvoiceTrans의 경우 LedgerDimension과 DefaultDimension이 하나의 테이블에있는 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 alongwith accountingDistribution 프레임 워크를 사용할 수 있습니다.
1) 게시 된 invoiceTransactions를 defaultdimensions 또는 ledgerDimensions와 함께 추적하는 모든 테이블 (예 : VendInvoiceTrans의 InventTransPosting). CustInvoiceTrans.LedgerDimension은 주 계정 만 표시하지만 원장 차원 필드에 자세한 정보가있는 테이블이 필요합니다.
또는
2) 및 generalJournalAccountEntry sourceDocumentLine의 추적() SubledgerJournalAccountEntryDistribution 같은 모든 테이블.