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,654

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

  • Kauto Profile Picture
    Kauto 2,654 on at
    RE: X++ Invoicing a purchase order including markup transactions (charge code) via code x++

    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

  • Suggested answer
    Pedro Tornich Profile Picture
    Pedro Tornich 955 on at
    RE: X++ Invoicing a purchase order including markup transactions (charge code) via code x++

    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
    Kauto 2,654 on at
    RE: X++ Invoicing a purchase order including markup transactions (charge code) via code x++

    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

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans