1

我正在处理显示总帐的 SSRS 自定义报告,并且需要在报告中显示帐户和子帐户以及供应商或客户的所有交易,例如,如果交易来自采购订单,那么我需要显示供应商,如果来自销售订单,那么我需要向客户展示。

我知道采购订单之间的关系,GeneralGournalAccountEntry但我需要 GeneralGournalAccountEntry 之间的关系来向客户展示。

4

1 回答 1

0

要知道它是否来自值为Sales的表中的Sales Order检查字段。JournalCategoryGeneralJournalEntry

要了解客户,我留下此代码:

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 回答