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)

Why Sales Order Total Amount is zero when status become invoiced!!!

(0) ShareShare
ReportReport
Posted on by 1,883

Dear all - I'm doing SalesTableListPage form customization and I wants to know why Total Amount is changed to zero when status become invoiced. I created display method on SalesTable as below to show TotalAmount in  SalesTableListPage form..

display AmountCur totalAmountSales()
    {

        SalesTotals SalesTotals;
        ;
        SalesTotals = SalesTotals::construct(this,SalesUpdate::All);
        SalesTotals.calc();
        return  SalesTotals.totalAmount();
    }

7450.invoice.jpg

*This post is locked for comments

I have the same question (0)
  • Dogan Adiyaman Profile Picture
    698 User Group Leader on at

    I'm not suprised becasue you are calling standard totalAmount() method and it works like that.

  • Faqruddin Profile Picture
    1,883 on at

    Hi Dogan - Could you please tell me which method I should call to get the total value when Status become invoiced in Sales orders...

    Thanks

    Faqru Shaik

  • krishna.rao@dax Profile Picture
    3,006 on at

    just use the existing display method in SalesTable.

    amountInvoiced()

    server display AmountCur amountInvoiced()
    {
    CustInvoiceJour custInvoiceJour;

    select sum(InvoiceAmount) from custInvoiceJour
    where custInvoiceJour.RefNum == RefNum::SalesOrder
    && custInvoiceJour.SalesId == this.SalesId;

    return custInvoiceJour.InvoiceAmount;
    }

  • Faqruddin Profile Picture
    1,883 on at

    Hi Krishna - No its wrong one. I used this one before and it returns zero values for all sales orders. Please check in your environment..

  • Suggested answer
    Community Member Profile Picture
    on at

    Have you checked InvoiceAmount method?

  • Faqruddin Profile Picture
    1,883 on at

    There is no such a method in SalesTable. Could you please tell me where its located..

  • krishna.rao@dax Profile Picture
    3,006 on at

    Either you are doing wrong or not aware of how to use the display method.

    In my system  the values are displaying.

    Make sure have you mentioned datasource in the control.

  • Faqruddin Profile Picture
    1,883 on at

    Hi Krishna - Have a look my screens and it returns all zeros only...

    amountval.jpg

    amountval.jpg

  • krishna.rao@dax Profile Picture
    3,006 on at

    Go to the Invoice ActionPane tab & check invoice journals.

    let us know is there Invoice amount?

  • Faqruddin Profile Picture
    1,883 on at

    Yes there is Invoice amount values. So tell me now what should I do exactly!!!

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