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)

Total Sales Invoiced Amount on SalesTableListPage Form

(0) ShareShare
ReportReport
Posted on by 1,883

Dear all,

I have an issue with following method is not displaying invoiced amount. Before invoicing the method is calculating invoicing amount but once after its invoiced the amount becomes zero in main SalesTableListPage Form. Could you please help me with any other methods that calculate Sales order invoice amount even after its invoiced.

 display AmountCur totalSalesAmount()
 {

      SalesTotals salesTotal;
         ;

       salesTotal = SalesTotals::construct(this, SalesUpdate::All);
       salesTotal.calc();

      return  salesTotal.totalAmount();

}


Regards,

Faqru

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    That’s a standard behaviour of AX. After you invoice an order, go on Total's button from UI and you would wonder that everything is zero. Once order is invoiced you cannot see amounts in total. An alternative to that should be something as under:

    If(Order Not Invoiced)

    {

    Calculate from SalesTotal Classes

    }

    Else

    {

    Get amount from invoiced journals, of that order.

    }

  • Faqruddin Profile Picture
    1,883 on at

    Thanks Shoaib. I really wondered with AX UI button after its invoiced. However could you please help me with invoiced journal tables.

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    what kind of help you would like to have?

    have you had a look at any of following..?

    CustInvoiceJour[Table].InvoiceAmount[Field]

    CustInvoiceJour[Table].InvoiceAmountMST[Field]

    Should not be difficult to get sum of all posted invoice journal by using Select Sum(FieldName)

  • Verified answer
    Faqruddin Profile Picture
    1,883 on at

    Thanks shoaib. There is already standard method amountInvoiced on SalesTable. Below code is working for me.

     display AmountCur totalSalesAmount()
     {
        SalesTotals salesTotal;
           ;
    
    
         if(this.SalesStatus == SalesStatus::Invoiced)
         {
    
          return this.amountInvoiced();
    
         }
    
         else 
         {
    
          salesTotal = SalesTotals::construct(this, SalesUpdate::All);
          salesTotal.calc();
          return  salesTotal.totalAmount();    
    
      }
    
     }

    Regards,

    Faqru

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