1

私は総勘定元帳を表示する SSRS カスタム レポートに取り組んでおり、アカウントとサブアカウント、およびベンダーまたは顧客のすべてのトランザクションをレポートに表示する必要があります。たとえば、トランザクションが発注書からのものである場合、ベンダーを表示する必要があります。販売注文から来た場合は、顧客に表示する必要があります。

Purchase Order との関係は知ってGeneralGournalAccountEntryいますが、顧客に表示するには GeneralGournalAccountEntry との関係が必要です。

4

1 に答える 1

0

値がSalesのテーブルのSales Orderチェック フィールドJournalCategoryから来ているかどうかを知るため。GeneralJournalEntry

顧客を知るために私はこのコードを残します:

static void stackoverflow(Args _args)
{
    GeneralJournalAccountEntry GeneralJournalAccountEntry;
    GeneralJournalEntry        GeneralJournalEntry;
    CustInvoiceJour            CustInvoiceJour;
    CustTable                  CustTable;

    ;

    select * from GeneralJournalAccountEntry where GeneralJournalAccountEntry.RecId == 88888888 //Your GeneralJournalAccountEntry recId
        join GeneralJournalEntry where GeneralJournalEntry.RecId           == GeneralJournalAccountEntry.GeneralJournalEntry &&
                                       GeneralJournalEntry.JournalCategory == LedgerTransType::Sales //Sales Order                                            
        join CustInvoiceJour     where CustInvoiceJour.LedgerVoucher       == GeneralJournalEntry.SubledgerVoucher
        join CustTable           where CustTable.AccountNum                == CustInvoiceJour.InvoiceAccount;

    info(CustTable.AccountNum);
}
于 2016-12-06T13:01:48.420 に答える