【问题标题】:General Ledger report总帐报表
【发布时间】:2016-12-06 21:01:48
【问题描述】:

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

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

【问题讨论】:

  • 有什么原因不能使用 Purchase Order/SalesOrder 和 CustTable 之间的关系吗?它仍然与 GeneralJournalAccountEntry 相关,只是通过另一个表。

标签: axapta dynamics-ax-2012 ax dynamics-ax-2012-r2


【解决方案1】:

要知道它是否来自 销售订单,请检查 GeneralJournalEntry 表中的字段 JournalCategory,其值为 Sales

要了解客户我留下这个代码:

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);
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-16
    • 1970-01-01
    相关资源
    最近更新 更多