web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Customer Invoice Life Cycle

(0) ShareShare
ReportReport
Posted on by

I am struggling to Track how customer  invoice is settled  through various steps . I want to build query using below tables like 

CUSTINVOICETABLE 

CUSTTRANS , CUSTSETTLEMENT   not sure  what tables else  I need  it 

 Say  I have Invoice 0001 , invoiced on 1st Of June 2017 , partially credit noted , partially allocated from Prepayments , Partially Paid , Partially Unsettled / settled Again .  How can i see the entire invoice settlement life cycle from Invoice raised stage to full settlement and How to tie up credit notes issued against invoice  etc 

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,025 Super User 2025 Season 2 on at

    Hi,

    The CustSettlement has references per record to two CustTrans records. One CustTrans can be an invoice transaction; the other a partial payment. It is possible that multiple CustSettlement records will point to the same CustTrans record of the invoice.

    From the CustTrans, you can find the CustInvoiceTable if you need some more details which are not stored on the CustTrans.

  • Community Member Profile Picture
    on at

    Thank you Andre for your help .

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    CustInvoiceTable holds data for customer free text invoice and you can get desired data from tables CustInvoiceTable, CustTrans and CustSettlement based on following code/job:

    static void AXC_FreeTextInvoice(Args _args)
    {
        CustTrans           custTrans;
        CustInvoiceTable    custInvoiceTable;
        CustSettlement      custSettlement;
        
        while select custInvoiceTable
            where custInvoiceTable.InvoiceAccount == "XYZ" // Specify invoice account here
            join custTrans
            where custTrans.Invoice == custInvoiceTable.InvoiceId
            && custTrans.Invoice == "Inv1" // Specify invoiceId here
            && custTrans.AccountNum == custInvoiceTable.InvoiceAccount
            join custSettlement
            where custSettlement.TransCompany == custTrans.dataAreaId
            && custSettlement.TransRecId == custTrans.RecId
            && custSettlement.AccountNum == custTrans.AccountNum
        {
            info(strFmt("Account: %1, Invoice: %2, SettleAmountCur : %3", custInvoiceTable.InvoiceAccount, custTrans.Invoice, custSettlement.SettleAmountCur));       
        }
    }


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans