2016-07-10 13 views
0

似たような質問がたくさんあることは知っていますが、残念ながら、私の問題に答えている人はいません。 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ような任意のテーブル()。

答えて

3

InventTransPostingは在庫の取引のみを保持します。 VendとCustの取引の一部のみが在庫転記によって補完されます。 必要なものを得る最も良い方法は、LedgerTransVoucherのフォームを見て、VoucherボタンをクリックしてフォームCustTransフォームと呼ばれるときに初期化される方法を確認することです。 あなたの場合、SubledgerVoucherGeneralJournalEntryを使用して、CustTransのVoucherとTransDateによってそれをフィルタリングする必要があります。次に、これに参加してすべての補助元帳転記を取得することができます。