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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

failure posting intercompany purchase order through Code

(0) ShareShare
ReportReport
Posted on by 1,330

Hi,

It's all in x++ customization. user imports a list of orders.

I have created  purchase order which in turn creates intercompany sales order

then i m posting sales order invoice and finally i am trying to post the purchase order which throws me below error

Customer tax invoice in company XYZ= 0.00, purchase is updated with 13,080.35.

This error is located in Class PurchInvoiceJournalCreate. I am not sure why CustINvoiceJourLocal.InvoiceAmount is 0.  When i posted sales order , it must have the amount picked up from the corresponding purchase order and used the same in the sales invoice created in CustInvoiceJournal table.

Any help would be appreciated. 

*This post is locked for comments

  • Mea_ Profile Picture
    60,286 on at

    When you try to invoice PO it checks if intercompany SO invoice has same value. In your case value is 0 and PO invoice is 13,080.35

    As you said you invoice SO first so why did you post it for 0 ? 

  • mail2vd Profile Picture
    1,330 on at

    what i found is that, when it creates purchase order, it has a line with GST Group as 'FREE' and it means there won't be any sales tax on it.

    but while creating corresponding sales order (standard AX Code), it doesn't keep the same GST Group for the sales Line. and hence the difference in the amount

    I tried to create from AX Client and it has the same behaviour.

    I feel i need to modify the standard ax code which will force ax to use the same GST  between those purchline and salesline.

  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    Just be aware that tax group is company specific so you have to have same group in both companies if you going to change code.

    I think AX takes GST group from item and customer (functional guys will correct me if i'm wrong) so you can change setup instead of changing code.

  • mail2vd Profile Picture
    1,330 on at

    but when i create PO from the AX client,   I select GST myself for a purch line. so that wouldn't be item or company specific. it's as per user's wish. isn't it?

    So when it creates sales order line in intercompany for that PO, it is expected that it follows what's in there for purch line.

  • Mea_ Profile Picture
    60,286 on at

    When you select item in SO line it will take TaxItemGroupId from item. TaxGroup AX inits base on SO header fields. As a user you can change it them manually.

    However they are company specific so if in company A you have group "free' you may not have this group in company B so you cannot simply change code to set same group through intercompany chain

  • mail2vd Profile Picture
    1,330 on at

    what if i have "FREE" TaxGroup in both Company A and B, now how  and where intercompany SO/PO creation process matches them and pick them in the lines?

    I mean how do I resolve my issue then.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Prashant Singh Profile Picture

Prashant Singh 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans