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)

X++ Invoicing a purchase order including markup transactions (charge code) via code x++

(0) ShareShare
ReportReport
Posted on by 2,699

Hi,

I have code to generate the pending invoice data based on product receipts attached to a purchase order.

The PO also has charges attached to it, how do I go about ensuring that these charges get invoiced as well?

They are not being created as VendInvoiceInfoLines and I'm not sure how I ensure they get added during PurchFormLetter call so I was hoping someone could point me in the right direction here to ensure this works.

Thank you

*This post is locked for comments

I have the same question (0)
  • Kauto Profile Picture
    2,699 on at

    Hi

    Can someone simply assist on instructing me on which part of PurchFormLetter to call to ensure my markup transactions on the purchase order header get invoiced?

    Thanks

  • Suggested answer
    Pedro Tornich Profile Picture
    955 on at

    You just need to call the update() method on the PurchFormLetter.
    It should post the charges as well.

    Here is a sample code:

    purchFormLetter = PurchFormLetter::construct(DocumentStatus::Invoice);
    purchFormLetter.update(purchTable, strFmt(“Inv_%1”, purchTable.PurchId));

    After posting the purchase order when you go to the voucher, do you see the charges there?

  • Kauto Profile Picture
    2,699 on at

    Hi

    When I run this i get a message that document date isn't present the invoicing fails, even though i pass a date field in the update parameters

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